package com.aman.controller;

import com.aman.entity.dao.UserLogin;
import com.aman.service.AchUserLoginService;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * description:
 * ********************
 *
 * @author lv jin
 * @date 2025/1/13 17:08
 */
@RestController
@Validated
@RequiredArgsConstructor
public class AchUserLoginController {
    @Autowired
    private final AchUserLoginService achUserLoginService;

    @Operation(summary = "用户登录")
    @PostMapping("/count")
    public Integer login(@Validated @RequestBody UserLogin userLogin) {
        return achUserLoginService.login(userLogin);
    }
}
